<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
        <title>Pastel</title>
    </h:head>
    <h:body>
        <div align="left" style="margin: 0 auto;float: left;border-color: cornflowerblue;border-style: groove">
            <div align="left" style="border-style: double;border-color: cornflowerblue"><h1>Pastel - Pedido</h1></div>
            <h:form>

                <div style="border-style: groove">
                    <h4>Cliente:<h:inputText value="#{cliente.nome}"/></h4>
                </div>
                <div style="border-style: groove">
                    <h4>Tipo:</h4>
                    <h:selectOneRadio value="#{cliente.escolha}">
                        <f:selectItems value="#{cliente.tipos}"/>
                    </h:selectOneRadio>
                </div>
                <div style="border-style: groove">
                    <h4>Você conheceu o pastel por:</h4>
                    <h:selectManyCheckbox value="#{cliente.escolhaIndicacao}" layout="pageDirection">
                        <f:selectItems value="#{cliente.indicacao}"/>
                    </h:selectManyCheckbox>

                </div>
                <div style="border-style: groove">
                    <div><h4>Sabores:</h4></div>
                    <div>
                        <h:selectManyListbox value="#{cliente.escolhaSabor}">
                            <f:selectItems value="#{cliente.sabor}"/>
                        </h:selectManyListbox>
                    </div>
                </div>
                <div align="left" style="border-style: inset;border-color: blue;padding-top: 10px;padding-bottom: 10px">
                    <h:commandButton value="Ok" style="float: none" action="#{cliente.verificar}"/>
                    <h:commandButton value="Limpar" style="margin-left: 20px;float: none" action="#{cliente.limpar}"/>
                </div>

            </h:form>
        </div>

        <div style="margin-left: 75px;float: left">
            <h:dataTable border="4" var="pastel" value="#{cliente.listaPastel}" style="float: left;border-color: cornflowerblue">
                <f:facet name="header"><b>Pastéis</b></f:facet>
                <h:column><f:facet name="header"><b>Sabores</b></f:facet>#{pastel.sabor}</h:column>
                <h:column><f:facet name="header"><b>Preço</b></f:facet>#{pastel.preco}</h:column>
            </h:dataTable>
        </div>
    </h:body>
</html>

